﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.oa.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.oa.dao.*;
import com.hh.bss.oa.entity.*;
import com.hh.bss.oa.service.*;
import com.hh.bss.oa.vo.query.*;
import com.hh.bss.util.*;





public class OaSmsMt extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "OaSmsMt";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CALL_FROM = "callFrom";
	public static final String ALIAS_CALL_ID = "callId";
	public static final String ALIAS_SEND_DT = "sendDt";
	public static final String ALIAS_SENDER = "sender";
	public static final String ALIAS_RECIEVER = "reciever";
	public static final String ALIAS_CONTENT = "content";
	
	//date formats
	public static final String FORMAT_SEND_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	@Length(max=20)
	private java.lang.String callFrom;
	
	private java.lang.Integer callId;
	
	private java.util.Date sendDt;
	@Length(max=100)
	private java.lang.String sender;
	@Length(max=255)
	private java.lang.String reciever;
	@Length(max=255)
	private java.lang.String content;
	//columns END

	public OaSmsMt(){
	}

	public OaSmsMt(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setCallFrom(java.lang.String value) {
		this.callFrom = value;
	}
	
	public java.lang.String getCallFrom() {
		return this.callFrom;
	}
	public void setCallId(java.lang.Integer value) {
		this.callId = value;
	}
	
	public java.lang.Integer getCallId() {
		return this.callId;
	}
	public String getSendDtString() {
		return DateConvertUtils.format(getSendDt(), FORMAT_SEND_DT);
	}
	public void setSendDtString(String value) {
		setSendDt(DateConvertUtils.parse(value, FORMAT_SEND_DT,java.util.Date.class));
	}
	
	public void setSendDt(java.util.Date value) {
		this.sendDt = value;
	}
	
	public java.util.Date getSendDt() {
		return this.sendDt;
	}
	public void setSender(java.lang.String value) {
		this.sender = value;
	}
	
	public java.lang.String getSender() {
		return this.sender;
	}
	public void setReciever(java.lang.String value) {
		this.reciever = value;
	}
	
	public java.lang.String getReciever() {
		return this.reciever;
	}
	public void setContent(java.lang.String value) {
		this.content = value;
	}
	
	public java.lang.String getContent() {
		return this.content;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("CallFrom",getCallFrom())
			.append("CallId",getCallId())
			.append("SendDt",getSendDt())
			.append("Sender",getSender())
			.append("Reciever",getReciever())
			.append("Content",getContent())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof OaSmsMt == false) return false;
		if(this == obj) return true;
		OaSmsMt other = (OaSmsMt)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

